from flask import Flask, render_template
import os

app = Flask(__name__)

@app.route('/')
def index():
    # 检查图片是否存在
    scatter_img = 'age_mileage_scatter.png'
    pie_img = 'car_type_distribution_pie.png'
    
    return render_template('index.html', 
                         scatter_img=scatter_img,
                         pie_img=pie_img)

if __name__ == '__main__':
    app.run(debug=True)